package com.yc.spring.jdbc.controller;

import com.yc.spring.jdbc.biz.BankBiz;
import com.yc.spring.jdbc.entity.Account;
import com.yc.spring.mvc.entity.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpSession;

@RestController
public class userController {
    private final HttpSession httpSession;
    @Autowired
    BankBiz biz;

    public userController(HttpSession httpSession) {
        this.httpSession = httpSession;
    }

    @GetMapping("login")
    public void login(Account user){
        System.out.println("login");
        biz.login(user);
    }
}
